package com.dg11185.nearshop.net.request;

import android.util.Log;

import com.dg11185.libs.network.http.client.HttpRequest;
import com.dg11185.libs.utils.MD5.MD5Utils;
import com.dg11185.nearshop.app.Constants;
import com.dg11185.nearshop.net.NetUtils;
import com.dg11185.nearshop.net.response.ModifyInfoResponse;

/**
 * 修改会员详情
 * @author wanliang527
 * @date 2014-4-29
 */
public class ModifyMemberDetailRequest extends HttpRequest<ModifyInfoResponse> {

    /**
     * 
     * @param userId
     *            会员ID
     * @param customerName
     *            会员真实姓名(最长100)
     * @param idCard
     *            证件号(最长50)
     * @param sex
     *            性别(0表示男;1表示女)
     * @param job
     *            最长100
     * @param birthday
     *            生日(yyyy-MM-dd)
     */
    public ModifyMemberDetailRequest(String userId, String customerName,
            String idCard, String sex, String job, String birthday) {
        super(Constants.ADDRESS, Constants.modifyDetail);
        addParam("userId", userId);
        addParam("customerName", customerName);
        addParam("idCard", idCard);
        addParam("sex", sex);
        addParam("job", job);
        addParam("birthday", birthday);
        addParam("chshToken", Constants.TOKEN);
        addParam("chshSign", MD5Utils.getMD5Str(getParams(), Constants.MD5_key));
    }

    @Override
    protected ModifyInfoResponse parseJson(String response) throws Exception {
        ModifyInfoResponse res = new ModifyInfoResponse();
        res.parseJson(response);
        return res;
    }

}
